// Type.cpp : implementation file
#include "stdafx.h"

/*
#ifndef _TYPE_CPP
#define _TYPE_CPP
*/

#include "Type.h"

/*
#ifndef _TOKEN_CPP
#include "../Token.cpp"
#endif
*/
Type::Type(const string& ss):Token(ss){}
Type::Type(Type::const_reference Ty):Token(Ty){}
string Type::view() const {return string("Ty")+Token::view();}
Type::~Type(){}

Token::pointer Type::replaceAll(Token::const_reference To1, Token::const_reference To2) const{
        if((To1.isType())&&(To2.isType()))
           return Token::replaceAll(To1, To2);
	        
	throw Type::exception("Incompatible Type Replacement operation at Type::replaceAll");
}	 

bool Type::hasSubType(Type::const_reference Ty) const{
	return this->operator==(Ty);
}

//#endif
